<template>
    <div>
            <el-page-header @back="back" :content="content">
            </el-page-header>
               <el-table class="yx_table interview-record-table" v-for="(item,index) in interviewrecord" :key="index" :show-header="false" border :data="item">
                   <el-table-column prop="title" width="280">
                   </el-table-column>
                   <el-table-column prop="value" >
                        <template slot-scope="scope">
                          <div v-if="scope.row.type!=4">{{scope.row.value}}</div>
                          <div v-else >
                            <el-image v-for="(v,i) in scope.row.value"
                                  style="width: 100px; height: 100px"
                                  :key="i"
                                  :src="v"></el-image>
                          </div>
                        </template>
                   </el-table-column>
               </el-table>
    </div>
</template>

<script>
    export default {
        name:'InterviewRecord',
        data() {
            return {
                content:'走访记录',
            }
        },
        methods: {
            back(){
                this.$router.push({
                   name:'specialpersonlist',
                   query:{
                     g_id:this.$store.getters.getCurrentGId
                   }
                });
            }
        },
        created(){
            //查询记录
            if(this.id!=-1){
                var send_data={
                    api_token:this.$store.getters.getSessionId,
                    id:this.id
                }
                this.$store.dispatch('loadInterviewRecord',send_data);
            }
        },
        computed:{
            id(){
                return this.$route.params.id;
            },
            interviewrecord(){
                return this.$store.getters.getInterviewRecord;
            }
        }
    }
</script>

<style>
    .interview-record-table{
        margin-top:30px;
    }
</style>
